SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE VIEW dbo.vwrTareas
AS
SELECT     dbo.tb_Tareas.idTarea AS ID, dbo.tb_Tareas.Nombre AS Descripcion, dbo.tb_Procesos.Nombre AS Proceso, dbo.tb_Tareas.Duracion, 
                      dbo.tb_Tareas.Tipo, dbo.tb_Tareas.SenalEspera, dbo.tb_Tareas.SubProceso, dbo.tb_Tareas.Anterior, dbo.tb_Tareas.Anterior2, 
                      dbo.tb_Tareas.Posterior, dbo.tb_Tareas.Posterior2, dbo.tb_Tareas.Devolucion
FROM         dbo.tb_Tareas INNER JOIN
                      dbo.tb_Procesos ON dbo.tb_Tareas.Proceso = dbo.tb_Procesos.idProceso AND dbo.tb_Tareas.SubProceso = dbo.tb_Procesos.idProceso
GO
GRANT SELECT ON  [dbo].[vwrTareas] TO [CertificacionesServicios]
GRANT SELECT ON  [dbo].[vwrTareas] TO [SoloVer]
GO
